package com.leyou.putGoods.entity;

import cn.hutool.core.util.RandomUtil;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.lang.reflect.Array;
import java.time.LocalDateTime;
import java.util.Calendar;
import java.util.Date;
import java.util.List;

import com.leyou.common.utils.token.RasUtils;
import com.leyou.wareHouse.entity.MallGoods;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
 * <p>
 * 
 * </p>
 *
 * @author cyb
 * @since 2022-07-25
 */
@Getter
@Setter
@ToString
  @TableName("put_goods")
@ApiModel(value = "PutGoods对象", description = "")
public class PutGoods implements Serializable {

    private static final long serialVersionUID = 1L;

      @TableId(value = "id", type = IdType.AUTO)
      private Integer id;

    private String orederNumber;

    public void setOrederNumber() {
        Calendar ca = Calendar.getInstance();
        int year = ca.get(Calendar.YEAR);
        int mm = ca.get(Calendar.MONTH) + 1;
        int day = ca.get(Calendar.DAY_OF_MONTH);

        String s = RandomUtil.randomNumbers(4);
        this.orederNumber = "CGD"+year+mm+day+s;
    }

    private Integer pid;

    private Integer storeId;

    private Integer mallGoodsId;

    private Integer mallGoodsSpecsId;

    private Integer putNumber;

    private LocalDateTime createTime;

    private String workUser;

    private String requestUser;

    private String statu;


      @ApiModelProperty("备注")
      private String remark;


    @TableField(exist = false)
    private List<PutGoods> children;


}
